﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace RO___Simulasi_Boarding
{
    class Cell
    {
        Bitmap image;
        public Bitmap Image
        {
            get { return image; }
            set { image = value; }
        }

        Point position;
        int status;

        Passanger passanger;
        internal Passanger Passanger
        {
            get { return passanger; }
            set { passanger = value; }
        }

        List<Passanger> tempPassangers;
        internal List<Passanger> TempPassangers
        {
            get { return tempPassangers; }
            set { tempPassangers = value; }
        }

        public Cell()
        {
        }
        public Cell(Point position, int cellStatus, int column)
        {
            this.position = position;
            this.status = cellStatus;
            this.tempPassangers = new List<Passanger>(column / 2);
            this.Passanger = null;
        }
        public void gambar(Graphics g)
        {
            if (status > 0)
            {
                //if (status == 1) g.FillRectangle(Brushes.Blue, position.X, position.Y, 30, 30);
                //else if (status == 2) g.FillRectangle(Brushes.Red, position.X, position.Y, 30, 30);
                //g.FillRectangle(Brushes.Black, position.X+25, position.Y, 5, 30);
                g.DrawImage(image, position.X-5, position.Y, 33, 35);
            }
        }
        public void setPosition(Point p)
        {
            position = p;
        }
        public Point getPosition()
        {
            return position;
        }
    }

}
